/**
 * @Date 2023-03-21 10:03:49
 * @Remark
 */

// react
import React from "react";
// lib
import { Button, Popover } from "antd";
// components & widget
// style
// config
// script & methods & public
// store
// controller
// interface && type
// 其它

const TableColumns = [
  {
    title: "编号",
    dataIndex: "id",
  },
  {
    title: "操作员名称",
    dataIndex: "operationUserName",
  },
  {
    title: "操作类型",
    dataIndex: "operationType",
  },
  {
    title: "操作时间",
    dataIndex: "operationCreateTime",
  },
  {
    title: "IP",
    dataIndex: "operationIp",
  },
  {
    title: "功能模块",
    dataIndex: "operationModular",
  },
  // {
  //   title: "操作描述",
  //   dataIndex: "operationDesc",
  // },

  {
    title: "请求耗时m",
    dataIndex: "takeUpTime",
  },
  {
    title: "请求URI",
    dataIndex: "operationUri",
  },
  {
    title: "请求参数",
    dataIndex: "operationRequestParam",
    render: (v: string) => (
      <Popover
        overlayStyle={{
          maxWidth: "900px",
          wordBreak: "break-all",
          wordWrap: "break-word",
        }}
        placement="left"
        trigger="click"
        content={v}
        title="请求参数"
      >
        <Button>查看</Button>
      </Popover>
    ),
  },
  {
    title: "返回参数",
    dataIndex: "operationRespParam",
    render: (v: string) => (
      <Popover
        overlayStyle={{
          maxWidth: "900px",
          wordBreak: "break-all",
          wordWrap: "break-word",
        }}
        placement="leftTop"
        trigger="click"
        content={v}
        title="返回参数"
      >
        <Button>查看</Button>
      </Popover>
    ),
  },
];

export default TableColumns;
